With development of the Internet, people have an increasingly high requirement on network quality of service (QoS). However, workload on a router is relatively heavy because of enormous networks, diverse routing tables, and complex control algorithms, and consequently, network crashes frequently occur.
As the OPENFLOW develops, an OPENFLOW-based QoS management system is proposed. The QoS management system includes a controller, a primary switch, and multiple ingress switches. There are multiple data flows on the multiple ingress switches. Further, the controller first constructs, according to QoS configuration information, a flow table including QoS information, constructs a bandwidth turnover information base (also referred to as a lent and borrowed bandwidth information base) of all data flows, and constructs a bandwidth sharing relationship. Then the controller sends the constructed flow table including the QoS information to switches corresponding to all the data flows, queries bandwidth occupied by each data flow, and generates, according to a flow table of all the data flows and the bandwidth occupied by each data flow, a lendable bandwidth information base corresponding to all the data flows. When receiving a data flow forwarded by an ingress switch, the primary switch queries bandwidth of the data flow. The primary switch forwards the data flow if the bandwidth of the data flow is greater than or equal to bandwidth required by the data flow, or the primary switch needs to detect whether a bandwidth borrowing failure flag is set on the data flow if the bandwidth of the data flow is less than bandwidth required by the data flow. The primary switch performs packet discarding processing on the data flow if the primary switch detects that a bandwidth borrowing failure flag is set on the data flow, or the primary switch generates a bandwidth request message according to the bandwidth required by the data flow, and sends the bandwidth request message to the controller if the primary switch detects that no bandwidth borrowing failure flag is set on the data flow, and the controller allocates bandwidth to the data flow according to the bandwidth request message.
When the bandwidth of the data flow is less than the bandwidth required by the data flow, the primary switch needs to send the bandwidth request message to the controller in order to trigger the controller to allocate bandwidth to the data flow. Because a time period from a moment at which it is determined that the bandwidth of the data flow is less than the bandwidth required by the data flow to a moment at which the controller allocates bandwidth to the data flow is relatively long, the controller has relatively low efficiency when performing network management.